package com.zr.model;
// Generated 2017-7-4 20:10:00 by Hibernate Tools 4.0.0

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Employeeinformation generated by hbm2java
 */
@Entity
@Table(name = "employeeinformation", catalog = "lms")
public class Employeeinformation implements java.io.Serializable {

	private Integer eiId;
	private User user;
	private Deliverypoint deliverypoint;
	private String eiName;
	private String eiPosition;
	private String eiPhone;
	private String eistate;
	private Set<Order> orders = new HashSet<Order>(0);

	public Employeeinformation() {
	}

	public Employeeinformation(User user, Deliverypoint deliverypoint, String eiName, String eiPosition, String eiPhone,
			String eistate, Set<Order> orders) {
		this.user = user;
		this.deliverypoint = deliverypoint;
		this.eiName = eiName;
		this.eiPosition = eiPosition;
		this.eiPhone = eiPhone;
		this.eistate = eistate;
		this.orders = orders;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "eiId", unique = true, nullable = false)
	public Integer getEiId() {
		return this.eiId;
	}

	public void setEiId(Integer eiId) {
		this.eiId = eiId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "uid")
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "dpId")
	public Deliverypoint getDeliverypoint() {
		return this.deliverypoint;
	}

	public void setDeliverypoint(Deliverypoint deliverypoint) {
		this.deliverypoint = deliverypoint;
	}

	@Column(name = "eiName")
	public String getEiName() {
		return this.eiName;
	}

	public void setEiName(String eiName) {
		this.eiName = eiName;
	}

	@Column(name = "eiPosition")
	public String getEiPosition() {
		return this.eiPosition;
	}

	public void setEiPosition(String eiPosition) {
		this.eiPosition = eiPosition;
	}

	@Column(name = "eiPhone")
	public String getEiPhone() {
		return this.eiPhone;
	}

	public void setEiPhone(String eiPhone) {
		this.eiPhone = eiPhone;
	}

	@Column(name = "eistate")
	public String getEistate() {
		return this.eistate;
	}

	public void setEistate(String eistate) {
		this.eistate = eistate;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "employeeinformation")
	public Set<Order> getOrders() {
		return this.orders;
	}

	public void setOrders(Set<Order> orders) {
		this.orders = orders;
	}

}
